package edu.itcs6112.za.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import edu.itcs6112.za.domain.Customer;


public interface CustomerRepository extends PagingAndSortingRepository<Customer, Long> {
	public final static String FIND_BY_USERNAME = "FROM Customer c WHERE c.userName = :username";
	
	@Query(FIND_BY_USERNAME)
	Customer findByUserName(@Param("username") String username);
}
